import { createRouter, createWebHashHistory } from "vue-router";
import routes from "./routes";

const router = createRouter({
	history: createWebHashHistory(),
	routes,
	scrollBehavior(to, from, savedPosition) {
		if (savedPosition) {
			return savedPosition
		  } else {
			return { top: 0 }
		  }
	},
});

router.beforeEach((to, from, next) => {
	
	next();
});


export default router;